#include "maker.h"
#include "ui_maker.h"

maker::maker(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::maker)
{
    ui->setupUi(this);
    this->setGeometry(QRect(600,300,600,600));//设定窗体大小和起始坐标
}

void maker::paintEvent(QPaintEvent *event){
    QPainter painter(this);//画游戏背景
    painter.setPen(Qt::black);
    painter.setBrush(Qt::yellow);
    painter.drawRect(15,15,560,560);//外围
    painter.setPen(Qt::black);
    painter.setBrush(Qt::green);
    painter.drawRect(25,25,540,540);
    painter.drawPixmap(25,25,540,540,QPixmap(":/Images/Img/grass.png"));//内围
    QFont font1("Courier",24);
    painter.setFont(font1);
    painter.setPen(Qt::black);
    painter.setBrush(Qt::black);
    painter.drawText(230,260,"制作人员：");
    QFont font2("Courier",24);
    painter.setFont(font2);
    painter.setPen(Qt::black);
    painter.setBrush(Qt::black);
    painter.drawText(230,320,"何炜毅");

}
maker::~maker()
{
    delete ui;
}

void maker::on_pushButton_clicked()
{
    QApplication::exit();
}

